jsx3.Class.defineClass(
        "tibco.admin.monitormanage.uicomponents.table.sharedResources.SharedResources", //the full name of the class to create
        jsx3.gui.Block, //  extends
        null, // implements
        function (plugin) {
        	plugin.tableCacheId = "SPM_SHARED_RESOURCES_CACHE";
        	
            plugin.prototype.init = function() {
                this.jsxsuper();
            }
            
            plugin.prototype.getNamespace = function() {
               return "tibco.admin";
            }
            
            plugin.prototype.setUpComponent = function() {
            	var subject = tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.GridInfrastructure.nodeInfoCacheSubject;
            	tibco.admin.monitormanage.general.PageBusUtils.subscribe(subject, this.handleDisplayScreen, this);
            }
            
            plugin.prototype.handleDisplayScreen = function(subject, message, tableObj) {
            	tableObj.loadContent(tableObj);
            }
            
            plugin.prototype.loadContent = function(tableObj) {
           		var nodeInfoDoc = tibco.admin.Main.getServer().Cache.getDocument(tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.GridInfrastructure.nodeScreenCacheId);
       		 	if(nodeInfoDoc)
       		 	{
           			// transform the xml
           			var transformXSL = tibco.admin.Main.loadResource("tibco/admin/monitormanage/uicomponents/table/sharedResources/xsl/sharedResources.xsl", tableObj.getNamespace(), "IGNORED_ID", "xsl");
           			var transformedXML = nodeInfoDoc.transformNode(transformXSL);
            			
          			var transformedDoc = new jsx3.xml.CDF.Document.newDocument().loadXML(transformedXML);
           			tibco.admin.Main.getServer().Cache.setDocument(plugin.tableCacheId, transformedDoc);
             			
           			// now repaint the table
           			tableObj.getDescendantOfName("sharedResourcesTable_MM_infra").repaintData();
            	}
            }

        });